<?php

	/**
	 * ========================================================
	 * 	phpGCheckout, Open Source PHP G Checkout Library
	 * 	http://www.phpgcheckout.com
	 * ========================================================
	 * 
	 * Copyright (c) 2006 Expert Database Solutions, LLC
	 * 
	 * Permission is hereby granted, free of charge, to any person obtaining a 
	 * copy of this software and associated documentation files (the "Software"), 
	 * to deal in the Software without restriction, including without limitation the 
	 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
	 * copies of the Software, and to permit persons to whom the Software is 
	 * furnished to do so, subject to the following conditions:
	 * 
	 * The above copyright notice and this permission notice shall be included in all 
	 * copies or substantial portions of the Software.
	 * 
	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
	 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
	 * PARTICULAR PURPOSE AND NONINFRINGEMENT. 
	 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
	 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 
	 * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
	 * 
	 */

	/**
	 * Google Checkout Tax Table Primitive
	 *
	 * 
	 * This class is the abstraction of a Google Checkout Tax Table object.
	 * 
	 * @author Ron Howard
	 * @copyright Expert Database Solutions, LLC 2006
	 * 
	 */
	class gShippingOption {
		var $_price;
		var $_compnay;
		var $_carrier_pickup;
		var $_shipping_type;
		
		
		
		/**
		 * Default Constructor
		 *
		 * @param unknown_type $price
		 * @param unknown_type $company
		 * @param unknown_type $carrier_pickup
		 * @param unknown_type $shipping_type
		 * @return gShippingOption
		 */
		function gShippingOption($price, $company, $carrier_pickup, $shipping_type,$fixed_charge) {
			$this->_price 			= $price;
			$this->_company  		= $company;
			$this->_carrier_pickup  = $carrier_pickup;	
			$this->_shipping_type 	= $shipping_type;
			$this->_fixed_charge 	= $fixed_charge;
		}
		
		
		
		/**
		 * Returns the XML representation of the Tax Table.
		 * 
		 * @return XML Representation of Tax Table.
		 * @access  public.
		 *
		 */
		function getXML() {
			
			$str_xml = "<carrier-calculated-shipping-option>
							<price currency=\"USD\">$this->_price</price>
							<shipping-company>$this->_company</shipping-company>
							<carrier-pickup>$this->_carrier_pickup</carrier-pickup>
							<shipping-type>$this->_shipping_type</shipping-type>
							<additional-fixed-charge currency=\"USD\">$this->_fixed_charge</additional-fixed-charge>
						</carrier-calculated-shipping-option>";
			
			
			return $str_xml;	
		}
	}
?>